package com.ktjy.service.impl;

import com.ktjy.entity.SysUser;
import com.ktjy.mapper.SysUserMapper;
import com.ktjy.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("sysUserService")
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    SysUserMapper sysUserMapper;

    @Override
    public SysUser login(String account, String password) {
        SysUser sysUser = sysUserMapper.getByAccount(account);
        if (null != sysUser) {
            if (sysUser.getPassword().equals(password))
                return sysUser;
        }
        return null;
    }
}
